Runtime analysis tools are commonly used in software development to evaluate the behavior of computer programs. Runtime analysis refers to the practice of understanding computer program behavior using data collected during execution of a computer program. Typically, the computer program is instrumented using the runtime analysis tool. The runtime analysis tool inserts additional code within the computer program, referred to as the computer program under test. This additional code can perform various monitoring tasks and reporting functions that may or may not work cooperatively with the runtime analysis tool itself.
Some functions, for example, operating system functions involving device drivers, can cause an overlapped input/output (I/O) condition to occur. Overlapped I/O refers to the situation in which a range of memory is updated asynchronously. In illustration, a computer program can call a function causing an overlapped I/O condition. The computer program can continue to execute while an I/O request initiated by the called function remains pending. At some point, the I/O request is filled and the memory range is written, albeit not immediately responsive to the function being called by the computer program.
In some cases, the computer program inadvertently accesses the memory range prior to the I/O request being filled. Typically, this situation, referred to as a “race condition”, occurs as a result of faulty wait logic in the computer program. The computer program reuses the memory range for another purpose or uses incorrect data, i.e., data read from the memory range before the proper data is written through fulfillment of the I/O request. In any case, a race condition can result in erratic computer program behavior including faults or crashes.